package com.link2room.bumblebee.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/9/12.10:33
 */
@Entity
@DynamicInsert
@Table(name = "mns_producte_log_count")
public class MnsProducteLogCountEntity extends BaseEntity{
    private String producter;
    private String queueName;
    private Long count;

    @Basic
    @Column(name = "producter")
    public String getProducter() {
        return producter;
    }

    public void setProducter(String producter) {
        this.producter = producter;
    }

    @Basic
    @Column(name = "queueName")
    public String getQueueName() {
        return queueName;
    }

    public void setQueueName(String queueName) {
        this.queueName = queueName;
    }

    @Basic
    @Column(name = "count")
    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MnsProducteLogCountEntity that = (MnsProducteLogCountEntity) o;

        if (count != that.count) return false;
        if (producter != null ? !producter.equals(that.producter) : that.producter != null) return false;
        if (queueName != null ? !queueName.equals(that.queueName) : that.queueName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = producter != null ? producter.hashCode() : 0;
        result = 31 * result + (queueName != null ? queueName.hashCode() : 0);
        result = 31 * result + (int) (count ^ (count >>> 32));
        return result;
    }
}
